<?php
namespace Admin\Controller;
use Think\Controller;

class StatisticalController extends CommonController {
	public function index(){
		$specialty = M('specialty');
    	$res =$specialty->select();
        $this->assign('res',$res);
        $this->display();
		
	}
	public function showclass(){
		$spenum = I('get.id');
		$map = array('speNum'=>$spenum);
		$class = M('class');
    	$res =$class->where($map)->select();
        $this->assign('res',$res);
		$this->display();
	}    
}
//嵌套统计人数
/*UPDATE class A
INNER JOIN(SELECT className,count(*) As Stat FROM student GROUP BY className )as B on B.className = A.className SET A.classSize = B.Stat
?>*/